package com.blb.edusearchservice.service;

import com.blb.common.entity.Course;
import com.blb.common.entity.PageEntity;

import java.io.IOException;
import java.util.Map;

/**
 * 课程索引的业务接口
 */
public interface CourseIndexService {

    /**
     * 初始化课程索引
     */
    void initCourseIndex() throws IOException;

    /**
     * 课程搜索
     * @param args
     * @return
     */
    PageEntity<Course> searchCourses(Map<String,String> args) throws IOException;

    /**
     * 保存课程
     * @param course
     */
    void saveCourse(Course course) throws IOException;

    /**
     * 删除课程
     * @param id
     */
    void removeCourse(String id) throws IOException;
}
